#! /bin/sh
# Examples of producing multiple shot records with susynlv
# Note that we label by shot record and since there are 50 offsets,
# use d2=0.02 (1/50).  We add some noise to make data a bit more
# realistic, in particular, velocity analyses (with suvelan) seem very
# "blocky" without a little noise.
WIDTH1=300
WIDTH2=600
HEIGHT=400
XOFF1=0
XOFF2=315
YOFF1=100
YOFF2=550

# Flat model and data
nx=101 fx=0 dx=0.05
nz=101 fz=0 dz=0.04
unif2 <model00deg ninf=2 nx=$nx nz=$nz dx=$dx dz=$dz \
	v00=1.0,1.0 method=linear |
ximage  perc=99 title="Flat Model" windowtitle="Flat Model"\
	label1="Depth (km)" label2="Distance (km)" \
	 n1=$nz f1=$fz d1=$dz  n2=$nx f2=$fx d2=$dx \
	wbox=${WIDTH1} hbox=${HEIGHT} xbox=${XOFF1} ybox=${YOFF1} &

######Work in km (synlv puts 10^3 in header fields)######
#  ref="1:1,2;4,2"      reflector(s):  "amplitude:x1,z1;x2,z2;x3,z3;..."
REF="1.0:0.0,1.0;5.0,1.0"

n1=750 ft=0.0 dt=0.008     # time information: number, first, spacing
nxs=5 fxs=0.0 dxs=0.025    # shot information: number, first, spacing
nxo=50 fxo=0.05 dxo=0.05   # offset information: number, first, spacing

dvdz=0.0    # velocity gradient (dv/dz)
dvdx=0.0    # velocity gradient (dv/dx)
v00=2.0     # P-wave velocity at surface in km/s
ob=1        # include obliquity (both sides of interface are reflecting)
er=1        # use exploding reflector amps
smooth=0    # connect picks on reflectors linearly

susynlv	nt=$n1 ft=$ft dt=$dt \
	nxo=$nxo fxo=$fxo dxo=$dxo \
	nxs=$nxs fxs=$fxs dxs=$dxs \
	v00=$v00 dvdx=$dvdx dvdz=$dvdz \
	ob=$ob er=$er smooth=$smooth  \
	ref=$REF |
suaddnoise sn=50 |
suximage perc=99 title="Zero Dip Shot Records" windowtitle="Zero Dip Shot"\
	label1="Time (sec)" label2="Shot Gather" \
	f2=1 d2=0.02 \
	wbox=${WIDTH1} hbox=${HEIGHT} xbox=${XOFF2} ybox=${YOFF1} &


#################################################################
# Sixty degree model and data
nx=101 fx=0 dx=0.05
nz=101 fz=0 dz=0.04
unif2 <model60deg ninf=2 nx=$nx nz=$nz dx=$dx dz=$dz \
	v00=1.0,1.0 method=linear |
ximage  perc=99 title="60 degree Model" windowtitle="60 degree Model"\
	label1="Depth (km)" label2="Distance (km)" \
	 n1=$nz f1=$fz d1=$dz  n2=$nx f2=$fx d2=$dx \
	-geometry ${WIDTH1}x${HEIGHT}+${XOFF1}+${YOFF2} &
nxs=1 fxs= dxs=            # shot information: number, first, spacing
nxo=50 fxo=0.05 dxo=0.05  # offset information: number, first, spacing
######Work in km (synlv puts 10^3 in header fields)######
#  ref="1:1,2;4,2"      reflector(s):  "amplitude:x1,z1;x2,z2;x3,z3;..."
REF="1.0:0.0,1.0;5.0,8.66025"

n1=750 ft=0.0 dt=0.008     # time information: number, first, spacing
nxs=5 fxs=0.0 dxs=0.025    # shot information: number, first, spacing
nxo=50 fxo=0.05 dxo=0.05   # offset information: number, first, spacing
dvdz=0.0    # velocity gradient (dv/dz)
dvdx=0.0    # velocity gradient (dv/dx)
v00=2.0     # P-wave velocity at surface in km/s
ob=1        # include obliquity (both sides of interface are reflecting)
er=1        # use exploding reflector amps
smooth=0    # connect picks on reflectors linearly

susynlv	nt=$n1 ft=$ft dt=$dt \
	nxo=$nxo fxo=$fxo dxo=$dxo \
	nxs=$nxs fxs=$fxs dxs=$dxs \
	v00=$v00 dvdx=$dvdx dvdz=$dvdz \
	ob=$ob er=$er smooth=$smooth  \
	ref=$REF |
suaddnoise sn=50 |
suximage perc=99 title="60 degree Shot Record" windowtitle="60 degree Shot"\
	label1="Time (sec)" label2="Shot Gather" \
	f2=1 d2=0.02 \
	wbox=${WIDTH2} hbox=${HEIGHT} xbox=${XOFF2} ybox=${YOFF2} &
exit 0
